package ute.mvc.controller.home;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping(value = "/news-detail/{newsID}")
public class NewsDetailController {

	@RequestMapping(method = RequestMethod.GET)
	public String getNewsDetail(@PathVariable String newsID, Model model) {

		String html = "Load news detail content from database in html form NewsDetailController.java" + newsID;

		model.addAttribute("html", html);
		return "news-detail";
	}
}
